<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobilelist/mobileList.css(css=${css})}"/>
			<script th:inline="javascript">
		    	var goodgroupid = [[${goodgroupid}]];
		    	var key = [[${key}]];
		    	var filter = [[${filter}]];
			</script>
		</th:block>
	</head>
	<body ontouchstart>
		<div class="weui-tab">
			<div class="weui-title-bar"><i class="fa fa-angle-left" onclick="toback()"></i><h1>商品列表</h1><span class="open-popup" data-target="#shaixuan">筛选<i class="fa fa-filter"></i></span></div>
		    <div class="weui-tab-home-bar">
			  <div class="list-main-mian weui-form-preview infinite weui-pull-to-refresh" id="listwrap">
			        <div id="top_refresh" class="weui-pull-to-refresh__layer" style="display: none;">
			            <div class="weui-pull-to-refresh__arrow"></div>
			            <div class="weui-pull-to-refresh__preloader"></div>
			            <div class="down">下拉刷新</div>
			            <div class="up">释放刷新</div>
			            <div class="refresh">正在刷新</div>
			        </div>
			 
			        <div class="weui-form-preview" id="goodslist">
				        <th:block th:fragment="goods_refresh">
					        <th:block th:each="good : ${goods.goodlist}">
						        <div class="weui-cell">
						        	<div class="weui-cell__hd"><img style="width: 90px;height: 90px;" th:src="${good.goodphoto}"/></div>
						        	<div class="weui-cell__bd" th:data-goodid="${good.goodentityid}" th:data-merchantsettleid="${good.merchantsettleid}" onclick="lookinfo(this.getAttribute('data-goodid'),this.getAttribute('data-merchantsettleid'))">
								    	<p class="cell-title" th:text="${good.goodname}"></p>
								    	<p class="cell-title-small">月售<span th:text="${good.salenumber} ? ${good.salenumber} : 0" />件</p>
								        <p class="cell-monly" th:text="'￥'+${good.goodprice}"></p>
								        <p class="cell-user-adds"><img th:src="@{{image}/mobile/member/pay-pic.png(image=${image})}" /><b th:text="${good.merchantname}"></b><span th:text="${good.marketname}"><i class="fa fa-map-marker"></i></span></p>
							        </div>
							        <!-- 
							        <div class="weui-cell__ft" th:onclick="'javascript:addnum(\''+${good.goodsalesid}+'\');'"><i class="fa fa-plus-circle"></i></div>
							         -->
						        </div>
					        </th:block>
				        </th:block>
			        </div>
			 		<div class="weui-nomerchandise">暂无商品</div>
			 		
			        <div class="weui-loadmore" style="display: none;">
			            <i class="weui-loading"></i>
			            <span class="weui-loadmore__tips">正在加载</span>
			        </div>
		 		</div>
		 		<!-- 
		 		<footer class="weui-foot_div_b">
		 			<div><a href="mobileshoppingcart.xhtml"><i class="fa fa-cart-plus weui-foot-b"></i><span class="carnum" th:text="${carnum}"></span></a></div>
		 		</footer>
		 		 -->
			</div>
			
		</div>
		
		<!-- 筛选弹框 -->
		<div id="shaixuan" class="weui-popup__container popup-bottom">
			<div class="weui-popup__overlay"></div>
			<div class="weui-popup__modal">
				<div class="weui-cell-tk-title"><a class='close-popup'><i class="fa fa-close"></i></a></div>
				<div class="weui-cell-tk">
					<div class="weui-cell-tk-category">
						<div class="weui-cell-category-title"><h3>类别</h3><span class="searchtext"></span><i onclick="shaixuanPopClick(this,1)" class="fa fa-angle-right"></i></div>
						<th:block th:each="goodgroup,istat : ${filter.goodgroupList}">
							<th:block th:if="${istat.index le 5}">
								<a class="btnitem" th:data="${goodgroup.entityid}" th:text="${goodgroup.name}" onclick="shaixuanClick(this,1)"></a>
							</th:block>
						</th:block>
					</div>
					<div class="weui-cell-tk-user">
						<div class="weui-cell-user-title"><h3>商家</h3><span class="searchtext"></span><i onclick="shaixuanPopClick(this,2)" class="fa fa-angle-right"></i></div>
						<th:block th:each="merchant,istat : ${filter.merchantList}">
							<th:block th:if="${istat.index le 5}">
								<a class="btnitem" th:data="${merchant.entityid}" th:text="${merchant.name}" onclick="shaixuanClick(this,2)"></a>
							</th:block>
						</th:block>
						<!-- 
						<a class="weui-curt">商家一商家一</a>
						 -->
					</div>
					<div class="weui-cell-tk-adds">
						<div class="weui-cell-adds-title"><h3>市场</h3><span class="searchtext"></span><i onclick="shaixuanPopClick(this,3)" class="fa fa-angle-right"></i></div>
						<th:block th:each="market,istat : ${filter.marketList}">
							<th:block th:if="${istat.index le 5}">
								<a class="btnitem" th:data="${market.entityid}" th:text="${market.name}" onclick="shaixuanClick(this,3)"></a>
							</th:block>
						</th:block>
					</div>
				</div>
				<div class="weui-cell-button">
					<a class="weui-cell-yellow-color" onclick="resetSearch()">重&nbsp&nbsp置</a>
					<a class="weui-cell-red-color" onclick="shaixuanSearch()">确&nbsp&nbsp定</a>
				</div>
			</div>
		</div>
		<!-- 筛选弹框 -->
		
		<!-- 筛选类别弹框 -->
		<div class="weui-screening-categories">
			<div class="weui-sc-content"></div>
		</div>
		<!-- 筛选类别弹框 -->
		
		<!-- 商品详情引用 -->
		<th:block th:replace="/mobile/member/menulist/menuListDetails"/> 
		<!-- 商品详情引用 -->
		
	<script type="text/javascript" th:src="@{{js}/mobile/member/mobilelist/mobileList.js(js=${js})}"></script>
	</body>
</html>